import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import axios from 'axios'
import App from './App.vue'

// 创建Vue应用
const app = createApp(App)

// 注册Element Plus组件库
app.use(ElementPlus)

// 注册Element Plus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

// 配置axios
app.config.globalProperties.$axios = axios
// 不设置baseURL，直接在代码中使用完整路径

// 挂载应用
app.mount('#app')